/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package model;

import java.io.Serializable;
import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.SequenceGenerator;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 *
 * @author Tadeu Augusto
 */
@Entity
public class Denuncia implements Serializable {

    @Id
    @GeneratedValue(generator = "DENUNCIA_SEQ", strategy = GenerationType.SEQUENCE)
    @SequenceGenerator(name = "DENUNCIA_SEQ", sequenceName = "DENUNCIA_SQ")
    @Column(name = "protocolo")
    private Long protocolo;
    
    @ManyToOne
    @JoinColumn(name = "id_usuario")
    private Usuario usuario;
    
    @Temporal(TemporalType.TIMESTAMP)
    @Column(name = "datahora")
    private Date dataHora;
    
    @ManyToOne
    @JoinColumn(name = "id_subtema")
    private SubTema subTema;
    
    private String observacao;
    private Double longitude;
    private Double latitude;
    
    public Denuncia(){
        
    }

    public Long getProtocolo() {
        return protocolo;
    }

    public void setProtocolo(Long protocolo) {
        this.protocolo = protocolo;
    }

    public Usuario getUsuario() {
        return usuario;
    }

    public void setUsuario(Usuario usuario) {
        this.usuario = usuario;
    }

    public Date getDataHora() {
        return dataHora;
    }

    public void setDataHora(Date dataHora) {
        this.dataHora = dataHora;
    }

    public SubTema getSubTema() {
        return subTema;
    }

    public void setSubTema(SubTema subTema) {
        this.subTema = subTema;
    }

    public String getObservacao() {
        return observacao;
    }

    public void setObservacao(String observacao) {
        this.observacao = observacao;
    }

    public Double getLongitude() {
        return longitude;
    }

    public void setLongitude(Double longitude) {
        this.longitude = longitude;
    }

    public Double getLatitude() {
        return latitude;
    }

    public void setLatitude(Double latitude) {
        this.latitude = latitude;
    }
    
}
